package com.zhdl.modules.prefiresys.entity;

import com.project.common.bean.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 防区当日小时数据，仅保持当日24小时数据，用于首页展示
 *
 * @author ACodeYuan
 * @Description:
 * @date 2023/7/21 16:01
 * @Version Y-1.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "defarea_hour_rec")
public class DefAreaHourRec extends BaseEntity<DefAreaHourRec, String> {
    /**
     * ID
     */
    @Id
    @Column(length = 32)
    private String id;

    /**
     * 探测器ID
     */
    @Column(length = 32, nullable = false)
    private String detectorId;

    /**
     * 防区ID
     */
    @Column(length = 32, nullable = false)
    private String areaId;

    /**
     * 小时，从0到23
     */
    @Column(nullable = false)
    private Integer hour;

    /**
     * 微粒子百分比
     */
    private float particlePercent;

    /**
     * 烟雾百分比
     */
    private float smokePercent;

    /**
     * 6-16
     * 上报标志
     */
    @Column(nullable = true, columnDefinition = "TINYINT default 0")
    private Integer reportStatus;

}
